﻿//
// Created: 2018/10/18
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.ZXBuiness;

namespace Model.ZXBuiness.Map
{
    internal  class ZXUserInfoMap:EntityTypeConfiguration< ZXUserInfo >    
    {
        public ZXUserInfoMap()
        {
             this.ToTable("ZX_UserInfo");
             this.HasKey(i => new { i.ZX_UserId });
             this.Property(i => i.ZX_UserId).HasColumnName("ZX_UserId");                     
             this.Property(i => i.WX_UserId).HasColumnName("WX_UserId");                     
             this.Property(i => i.ZX_UserName).HasColumnName("ZX_UserName");                     
             this.Property(i => i.ZX_UserLevel).HasColumnName("ZX_UserLevel");                     
             this.Property(i => i.ZX_UserParentId).HasColumnName("ZX_UserParentId");                     
             this.Property(i => i.ZX_UserSource).HasColumnName("ZX_UserSource");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.ZX_Platform).HasColumnName("ZX_Platform");                     
             this.Property(i => i.UpdateTime).HasColumnName("UpdateTime");                     
             this.Property(i => i.Updater).HasColumnName("Updater");                     
             this.Property(i => i.Remarks).HasColumnName("Remarks");
             this.Property(i => i.ZX_UserPwd).HasColumnName("ZX_UserPwd");
             this.Property(i => i.JiFeng).HasColumnName("JiFeng");
            this.Property(i => i.BindPhone).HasColumnName("BindPhone");
            this.Property(i => i.BindWeiXin).HasColumnName("BindWeiXin");
            this.Property(i => i.BindQQ).HasColumnName("BindQQ");
            this.Property(i => i.BindZhiFuBao).HasColumnName("BindZhiFuBao");
            this.Property(i => i.BindBankCard).HasColumnName("BindBankCard");
            this.Property(i => i.HaveEarnMoney).HasColumnName("HaveEarnMoney");            
        }   
    }
    
     public static class ZXUserInfoMapExtensions
    {
        public static void UserZXUserInfoMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new ZXUserInfoMap());
        }
    }
}